import {DeviceType} from "@/types/device";

export const getDeviceTypeLabel = (type: number) => {
    switch (type) {
        case DeviceType.PHONE:
            return "手机";
        case DeviceType.TABLET:
            return "平板";
        case DeviceType.DESKTOP:
            return "电脑";
        case DeviceType.TV:
            return "电视";
        case DeviceType.WEB:
            return "Web";
        default:
            return "未知设备";
    }
};

// 获取设备类型相关的图片
export const getDeviceTypeImage = (type: number) => {
    switch (type) {
        case DeviceType.PHONE:
            return require("assets/image/device/mobile.png");
        case DeviceType.TABLET:
            return require("assets/image/device/tablet.png");
        case DeviceType.DESKTOP:
            return require("assets/image/device/desktop.png");
        case DeviceType.TV:
            return require("assets/image/device/desktop.png");
        case DeviceType.WEB:
            return require("assets/image/device/browser.png");
        default:
            return require("assets/image/device/unknown.png");
    }
};